NextCode Forum Index NextCode
Open Source Software Creation
 

1.5 still cannot log in as server admin | http dumped
Click here to go to the original topic

 
       NextCode Forum Index -> Support (phpxmail)
View previous topic :: View next topic  
Author Message
psfan



Joined: 01 Oct 2008
Posts: 1

Posted: Wed Oct 01, 2008 8:21 am    Post subject: 1.5 still cannot log in as server admin | http dumped  

OS: dd-wrt 2.4 sp1, linux kernel 2.4.35
Firewall: temporily disabled
WEB server: thttpd 2.25
php: 5.2.6, cookies enabled
xmail: 1.2.5
phpxmail: 1.5
client browser: IE6 in XP Sp2
http sniffer: HttpAnalyzers
==================
My xmail runs ok. I think phpxmail & web server are ok since I can initially add a mail server via web page" http://<my xmail server>/phpxmail/index.php ".
After checked all settings I can find crues here, including ctrlaccounts.tab, servers.php, firewalls, I still cannot login as a server admin.
So I have to use a http analyzer program to see what happens when I click login.
here is part of the contents I dumped (some irrevent messages are omitted).
*client send:
GET /phpxmail/main.php?action=login HTTP/1.1
*server reply:
HTTP/1.1 302 HTTP
X-Powered-By: PHP/5.2.6
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Location: main.php?action=login&reloaded=yes
Content-type: text/html

*when login is clicked
*client send (POST data ommited):
POST /phpxmail/main.php HTTP/1.1
*server reply:
HTTP/1.1 302 HTTP
X-Powered-By: PHP/5.2.6
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Location: main.php?action=login&reloaded=yes
Content-type: text/html


Thus can we see that whatever POST data the client send even if contain the correct user/pass information, server always reply a redirect page pointing to the login-page.

What can I do to fix it ?
Back to top  
below_zero



Joined: 08 Apr 2005
Posts: 130
Location: Italy

Posted: Sat Oct 11, 2008 11:23 pm    Post subject: Re: 1.5 still cannot log in as server admin | http dumped  

Had you tryed to use full name (ie: your.xmaildoamain.tld) instaed of the IP address in the file servers.php?

(Try also 'localhost' if the web pages are on the same server of xmailserver)
Back to top  
phil-t



Joined: 20 Oct 2008
Posts: 2

Posted: Mon Oct 20, 2008 12:10 am    Post subject:  

Not sure if this helps,

But I installed PHPXMail on a QNAP NAS, which was preset with an admin account for the server admin.

When I went to change the server account via the ctrlaccounts.tab, I could no longer log in..

After some looking around, I found the issue, which may well be due to the Installation (it uses a predefined installation by QNAP)

On My installation, The login button seems to use the servers.php value of user/password irrespective of what is in the user/pass..

To get my going, I set the user/pass to the exact same values contained in servers.php, and I could then log in again.. if I change the user/pass via the phpxmail setup section, it changes the servers.php, but next time I try to login, it fails, as ctrlaccounts.tab does not update on my installation.

Not sure if that may help at all, it may be completely irrelevant, but worth mentioning!

Oh, and , dang, registering on here is hard, the 'code' image is ludicrously difficult to decipher! took my 6 or 7 attempts! :)
Back to top  
below_zero



Joined: 08 Apr 2005
Posts: 130
Location: Italy

Posted: Tue Oct 21, 2008 10:45 am    Post subject:  

There is a bit of confusion.

PHPXmail is a frontend for Xmail Server: in order to make PHPXMail working with Xmail Server then PHPXmail must known which is the account and password for to manage the Xmail Server itself (it seem instead, that you want to use PHPXmail to change the account of Xmail Server: this it is wrong) .

The file ctrlaccounts.tab contains that account (its a Xmail Server setting file), and so PHPXmail must to store the same information in its setting file servers.php (it must always match what is in the ctrlaccounts.tab of Xmail server !!!).

That it's all.
Back to top  
phil-t



Joined: 20 Oct 2008
Posts: 2

Posted: Tue Oct 21, 2008 11:47 pm    Post subject:  

There is confusion, I agree..


On my installation, the issue was I manually changed my CTRLaccounts.tab through SSH, when I next went to PHPXMail, I tried to log in using the Username/Password that I'd changed my ctrlaccount.tab to, but it seemed to always send my 'old' user/pass, not what I typed in the user/pass at the login screen. I found this was the case when I looked in teh XMail logs.

I had to edit the data in the servers.php to match the ctrlaccount.tab before I could login..

I wonder why the user/pass at the login screen was not sent, and the servers,.php was?

And also, in my installation, I can only access the PHPXMail setup when logged in to an XMail server, which means if I'm logged out, I only get login and legend links, giving no way to go and setup the servers.. And since I could only access it when logged in, I suppose I assumed it changed the XMail ctrlaccounts.tab as I was doing it while logged in..

My bad..

regards

Phil
Back to top  
below_zero



Joined: 08 Apr 2005
Posts: 130
Location: Italy

Posted: Wed Oct 22, 2008 11:20 am    Post subject:  

Dear Phil,
PHPXmail can run on another server respect to that one where it is installed Xmail Server by connecting remotely (through TCP-IP on port 6017) and so, for security reasons, PHPXmail does not allow unauthorised access to its interface, except the first time.
The original developer of PHPXmail, for the convenience, considered it correct to use the same account of “Xmail Server”.

To sum up:
a) there are two software that need both of an authorised login
b) PHPXmail use, for convenience, the same account of Xmail Server (it must always coincide)

To solve your problem you must proceed using an "additive" approach:
1) add a new accont in a new row of the file ctrlaccount.tab,
2) login to PHPXmail with the old account,
3) go to the setup and add the new account, then logout from PHPXmail,
4) remove the old account in the file ctrlaccount.tab
5) login to PHPXmail with the new account, then remove the old one.

Kind regards,

Marco.
Back to top  
 
       NextCode Forum Index -> Support (phpxmail)
Page 1 of 1


Powered by phpBB Search Engine Indexer
Powered by phpBB 2.0.13 © 2001, 2002 phpBB Group